package com.amigo.online.provider.sync.util;

import org.springframework.stereotype.Service;

import com.google.common.util.concurrent.RateLimiter;

@Service
public class AccessLimiterService {
    //每秒5个令牌
    RateLimiter rateLimiter = RateLimiter.create(5);

    public boolean tryAcquire() {
        return rateLimiter.tryAcquire();
    }

}
